package ar.pmt.gwt.client.menu.view;


import ar.pmt.gwt.client.Recurso;
import ar.pmt.gwt.client.layout.Layout;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.layout.BorderLayoutData;



public class MenuBarPmt extends MenuBar {


	public MenuBarPmt(final Panel w) {
		super(true);
		setAutoOpen(true);
		MenuItem menuitem1 = new MenuItem("Manager",false,new Command(){
				public void execute() {
					Window.alert("//TODO ");
					w.removeAll();
					
				}
			});
		MenuItem menuitem2 = new MenuItem("Proyecto",false,new Command(){
				public void execute() {
					Window.alert("//TODO implement");
				}
			});
		
		MenuItem menuitem3 = new MenuItem("Tarea",false,new Command(){
				public void execute() {
					Window.alert("//TODO implement");
					w.removeAll();
					w.add(Layout.getFooter(), new BorderLayoutData(RegionPosition.CENTER));
				}
			});
		MenuItem menuitem4 = new MenuItem("Main",false,new Command(){
			public void execute() {
				Recurso tarea= new Recurso();
				tarea.onModuleLoad();
			}
		});
		addItem(menuitem1);
		addItem(menuitem2);
		addItem(menuitem3);
		addItem(menuitem4);
	}
	
	

}
